package com.solweaver.greetings.dao;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.solweaver.greetings.entity.Invitee;
import com.solweaver.greetings.entity.User;

@Repository
public class InviteeDAO extends BaseDAO<Invitee, Long > {

	public List<Invitee> findByUser(User user) {
		List<Invitee> inviteeList = null;
		if(user != null){
			inviteeList = findByCriteria(Restrictions.eq("user", user));
		}
		return inviteeList;
	}

}
